Skip to content

feat(pm-console): the edge goes by the repository's settings, whatever a machine says - #14185

Merged
dezren39 merged 2 commits into
mainfrom
claude/pm-settings-own
Nov 24, 2026
Merged

dezren39 merged 2 commits into
mainfrom
claude/pm-settings-own

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Second step of #14163. The first (#14172) showed what would change in service: nothing today.

What was wrong

The Worker acted by whatever configuration the laptop's console last reported. Which repository and queue, and where the queue's store answers, which is where the queue's token is sent, were whatever the laptop's console was started with: the defaults of a checkout agents work in, a branch nobody merged included.

What changed

  • The Worker goes by its own for six settings: the repository, the queue, where the queue's store answers, what its token is called, the Android package and the instruction label. They are the ones its bundle carries (pm-stack/console/src/settings.ts), so they change with a merge to main and a deploy, and with nothing else.
  • What a machine tells is kept as told, compared, and shown. It is not used for those six.
  • The Machines screen says it. For a machine on other settings: each one with what the machine says, what main says, and which Cloudflare goes by. And it says when a machine and Cloudflare are on different commits (the half of pm-console: the laptop's console has not followed main since 2026-11-23 22:09Z #13833 that is about saying so).
  • The Worker no longer waits to be told where things are. It does the core as soon as a machine has said who may sign in, whether or not that machine's console is new enough to say where the queue is. Before any machine has said who may sign in it still does nothing.

What is deliberately not changed

  • Who may sign in is still as a machine tells it. That is set by the script that sets the hostname up, on the laptop. A Worker that stopped listening would keep the old sign-in the next time it is set up again and lock the owner out. It moves with Platform: the hostname, its sign-in and its route are applied from Actions, not from the laptop #13495.
  • The list of repositories looked in for what needs the owner is still the machine's while a machine tells one. A machine takes a reply only for an item in a repository on its own list, and what the Worker cannot do itself it leaves to a machine. Whether the Worker's token may write in the other three repositories cannot be known from outside. Reading by main's list while the laptop has its old one would make a reply that works today fail. The design record says what makes that switch safe.

How it was checked

  • 487 tests pass, type check, format check, --check, dry-run deploy.
  • In the real Worker runtime (49 checks): the stand-in host now tells others than main's for all six, throughout the run. Everything the run does has to be done by main's, and nothing that reaches the stand-ins for GitHub and the queue store may name anything the host told. With goesBy made to pass on what it was told, that check fails (5 of 21 calls named the host's).
  • 26 faults planted one at a time, all caught, among them: what the machine told gone by; the machine's word winning; where the token is sent left the machine's; the list switched too; what was told kept as gone by (so the difference is lost at a restart); written down again with every report; the Worker doing the core before anyone said who may sign in; values said with no end; the app reading which is gone by the wrong way round.
  • One existing test said the opposite of this change and was rewritten: a laptop too old to say where the queue is used to leave the Worker doing nothing.

In service

The laptop tells those six as main has them (machineSettingsDiffer is ["needsRepos"]), so nothing the Worker does changes today. Not seen from here: the Machines screen itself, which needs the owner signed in. It should say that the laptop's list of repositories is not main's, and that the laptop is on other code.


Generated by Claude Code


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…r a machine says

The Worker acted by whatever configuration the laptop's console last
reported (#14163). Which repository and queue, where the queue's store
answers and what its token is called, the Android package and the
instruction label are now the ones the Worker's own bundle carries
(src/settings.ts). What a machine tells for them is kept as told,
compared and shown, and not used. They change with a merge to main and
a deploy, and with nothing else: a console started from another
checkout does not move where the queue's token is sent.

- What is gone by is worked out from what was told (goesBy). Who may
  sign in is still as a machine tells it: that is set where the
  hostname is set up, a script on the laptop today (#13495).
- The list of repositories looked in for what needs the owner is still
  the machine's while a machine tells one. A machine takes a reply only
  for an item in a repository on its own list, and what the Worker
  cannot do itself it leaves to a machine: reading by another list than
  the machine's would show items the machine then refuses.
- The Worker does the core as soon as a machine has said who may sign
  in, whether or not that machine's console is new enough to say where
  the queue is.
- The Machines screen says, for a machine on other settings, each one
  with what the machine says, what main says and which Cloudflare goes
  by, and says when the two are on different commits.

In service the laptop tells those six as main has them
(machineSettingsDiffer is ["needsRepos"]), so nothing the Worker does
changes today.

Refs #14163

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5348906f-7e2b-4ba2-9aa0-0160be5b9abf
Commits

Reviewing files that changed from the base of the PR and between 407d540 and 139135a.

Files selected for processing: 11

  • doc/2026-11-23T06-50-00Z_architecture_pm_platform_cloudflare_core/2026-11-23T06-50-00Z_architecture_pm_platform_cloudflare_core.md
  • planning/roadmaps/pm-stack.md
  • pm-stack/console/edge/README.md
  • pm-stack/console/edge/src/edge.ts
  • pm-stack/console/public/app.js
  • pm-stack/console/scripts/edge-smoke.ts
  • pm-stack/console/src/edge-proto.ts
  • pm-stack/console/src/settings.ts
  • pm-stack/console/test/app.test.ts
  • pm-stack/console/test/edge.test.ts
  • pm-stack/console/test/settings.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants